package com.jt.demo5;

import org.springframework.context.annotation.*;

@Configuration
@ComponentScan("com.jt.demo5")
public class SpringConfig {

    @Bean
    //@Scope("singleton") //默认单例
    @Scope("prototype") //多例对象
   // @Lazy   //开启懒加载!!
    public Dog dog(){
        return new Dog();
    }
}

